package com.grape.dp.proxy.myself.handler;


import com.grape.dp.proxy.myself.inter.MyExtJdkInvocationHandler;
import com.grape.dp.proxy.myself.service.OrderService;

import java.lang.reflect.Method;


/**
 * 描述:$Proxy0
 * @author: myx
 * @date: 2019-07-27
 * Copyright © 2019-grape. All rights reserved.
 */
public class $Proxy0 implements OrderService {
    private MyExtJdkInvocationHandler h;

    public $Proxy0(MyExtJdkInvocationHandler h) {
        this.h = h;
    }

    @Override
    public void order() throws Throwable {
        // 如何获取真实目标方法呢
        Method orderMethod = OrderService.class.getMethod("order", new Class[]{});
        this.h.invoke(this, orderMethod, null);
    }
}
